#!/usr/bin/python3

import requests
import builtins

print("start")

# resp = requests.get('https://api.github.com/events')
#
# print(resp.headers)
# print('--------------')
# print(resp.content)
# print('--------------')
# print(resp.raw)
# print('--------------')

resp2 = requests.get('https://img.ithome.com/images/v2.3/ithome.logo.png', stream=True)
# resp2.raw.read(8)
# print(resp2.text)
with open('./test.png', 'wb') as fd:
    for chunk in resp2.iter_content(1024):
        fd.write(chunk)
